<%@page import="java.util.List"%>
<%@ page import="cn.ustb.entity.StudentGrade" %>
<%@ page import="com.github.pagehelper.PageInfo" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>课程成绩</title>
	<link rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css">
</head>
<body>

<ul class="layui-nav layui-bg-gray" lay-unselect="false">
	<li class="layui-nav-item">
		<a href="javascript:;">选课报名</a>
		<dl class="layui-nav-child">
			<dd><a href="<%=request.getContextPath()%>/courseselect.jsp">选修课报名</a></dd>
			<dd><a href="<%=request.getContextPath()%>/levelexamapply.jsp">考级报名</a></dd>
		</dl>
	</li>
	<li class="layui-nav-item">
		<a href="javascript:;">业务办理</a>
		<dl class="layui-nav-child">
			<dd>
				<a href="<%=request.getContextPath()%>/postponeExamApply.jsp">缓考申请</a>
			</dd>
			<dd>
				<a href="<%=request.getContextPath()%>/exemptionapply.jsp">免修申请</a>
			</dd>
		</dl>
	</li>
	<li class="layui-nav-item">
		<a href="javascript:;">信息查询</a>
		<dl class="layui-nav-child">
			<dd><a href="<%=request.getContextPath()%>/studentInformationServlet.do">学籍信息</a></dd>
			<dd><a href="<%=request.getContextPath()%>/courseSchedule.jsp">课表查询</a></dd>
			<dd><a href="<%=request.getContextPath()%>/studentQuery.grade">课程成绩</a></dd>
			<dd><a href="<%=request.getContextPath()%>/examArrange.jsp">考试安排</a></dd>
		</dl>
	</li>
	<li class="layui-nav-item">
		<a href="<%=request.getContextPath()%>/modifypassword.jsp">修改密码</a>
	</li>
	<li class="layui-nav-item">
		<a href="<%=request.getContextPath()%>/logoutServlet">注销</a>
	</li>
	<li class="layui-nav-item">${sessionScope.user.name },您好！</li>
</ul>

<div class="layui-tab">
	<ul class="layui-tab-title">
		<li class="layui-this">必修</li>
		<li>选修</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<table border="2" cellpadding="0" cellspacing="0">
				<tr>
					<th>学年学期</th>
					<th>学号</th>
					<th>学生姓名</th>
					<th>课程编号</th>
					<th>课程名称</th>
					<th>成绩</th>
					<th>绩点</th>
					<th>学分</th>
					<th>课程大类</th>
					<th>修读方式</th>
					<th>考试性质</th>
					<th>成绩方式</th>
					<th>有效</th>
					<th>备注</th>
				</tr>
				<%
					List<StudentGrade> studentGrades = (List<StudentGrade>)session.getAttribute("studentGradesBiXiu");
				%>
				<%
					for(StudentGrade student : studentGrades){

				%>
				<tr>
					<td><%= student.getYearTerm()%></td>
					<td><%= student.getStudentId()%></td>
					<td><%= student.getStudentName()%></td>
					<td><%= student.getCourseId()%></td>
					<td><%= student.getCourseName()%></td>
					<td><%= student.getScore() %></td>
					<td><%= student.getGradePoint() %></td>
					<td><%= student.getCredit() %></td>
					<td><%= student.getCourseClass() %></td>
					<td><%= student.getStudyWay() %></td>
					<td><%= student.getExamWay() %></td>
					<td><%= student.getGradeWay() %></td>
					<td><%= student.getEffectivity() %></td>
					<td><%= student.getRemarks() %></td>
				</tr>
				<%
					}
				%>
			</table>
<%--			<div id="demo-laypage-text"></div>--%>
<%--			<script>--%>
<%--				layui.use(function(){--%>
<%--					var laypage = layui.laypage;--%>
<%--					// 自定义文本--%>
<%--					laypage.render({--%>
<%--						elem: 'demo-laypage-text',--%>
<%--						count: ${pageInfoBiXiu.pages * 10},--%>
<%--						first: '首页',--%>
<%--						last: '尾页',--%>
<%--						prev: '<em>←</em>',--%>
<%--						next: '<em>→</em>'--%>
<%--					});--%>
<%--				});--%>
<%--			</script>--%>
<%--			<div id="bixiufanye">--%>
<%--				<ul>--%>
<%--					<li onclick="getInfo();return false;">首页</li>--%>
<%--					<c:forEach var="i" begin="1" end="${pageInfoBiXiu.pages}">--%>
<%--						<c:if test="${pageInfoBiXiu.pageNum==i }">--%>
<%--							<li style="background: #ff3366;color:#fff;" onclick="getInfo(${i});return false;">${i }</li>--%>
<%--						</c:if>--%>
<%--						<c:if test="${pageInfoBiXiu.pageNum!=i }">--%>
<%--							<li onclick="getInfo(${i});return false;">${i }</li>--%>
<%--						</c:if>--%>

<%--					</c:forEach>--%>
<%--					<li onclick="getInfo(${pageInfoBiXiu.pages});return false;">末尾</li>--%>
<%--				</ul>--%>
<%--			</div>--%>
<%--			<input type="hidden" name="page" value="">--%>
		</div>
		<div class="layui-tab-item">
			<table border="2" cellpadding="0" cellspacing="0">
				<tr>
					<th>学年学期</th>
					<th>学号</th>
					<th>学生姓名</th>
					<th>课程编号</th>
					<th>课程名称</th>
					<th>成绩</th>
					<th>绩点</th>
					<th>学分</th>
					<th>课程大类</th>
					<th>修读方式</th>
					<th>考试性质</th>
					<th>成绩方式</th>
					<th>有效</th>
					<th>备注</th>
				</tr>
				<%
					List<StudentGrade> studentGrades1 = (List<StudentGrade>)session.getAttribute("studentGradesXuanXiu");
				%>
				<%
					for(StudentGrade student : studentGrades1){

				%>
				<tr>
					<td><%= student.getYearTerm()%></td>
					<td><%= student.getStudentId()%></td>
					<td><%= student.getStudentName()%></td>
					<td><%= student.getCourseId()%></td>
					<td><%= student.getCourseName()%></td>
					<td><%= student.getScore() %></td>
					<td><%= student.getGradePoint() %></td>
					<td><%= student.getCredit() %></td>
					<td><%= student.getCourseClass() %></td>
					<td><%= student.getStudyWay() %></td>
					<td><%= student.getExamWay() %></td>
					<td><%= student.getGradeWay() %></td>
					<td><%= student.getEffectivity() %></td>
					<td><%= student.getRemarks() %></td>
				</tr>
				<%
					}
				%>
			</table>
<%--			<div id="xuanxiufanye">--%>
<%--				<ul>--%>
<%--					<li onclick="getInfo();return false;">首页</li>--%>
<%--					<c:forEach var="i" begin="1" end="${pageInfoXuanXiu.pages}">--%>
<%--						<c:if test="${pageInfoXuanXiu.pageNum==i }">--%>
<%--							<li style="background: #ff3366;color:#fff;" onclick="getInfo(${i});return false;">${i }</li>--%>
<%--						</c:if>--%>
<%--						<c:if test="${pageInfoXuanXiu.pageNum!=i }">--%>
<%--							<li onclick="getInfo(${i});return false;">${i }</li>--%>
<%--						</c:if>--%>

<%--					</c:forEach>--%>
<%--					<li onclick="getInfo(${pageInfoXuanXiu.pages});return false;">末尾</li>--%>
<%--				</ul>--%>
<%--			</div>--%>
<%--			<input type="hidden" name="page" value="">--%>
		</div>
	</div>
</div>

<%--	<style>--%>
<%--		.demo-tab-header .layui-btn.layui-this{border-color: #1E9FFF; color: #1E9FFF;}--%>
<%--		.demo-tab-body>div{display: none;}--%>
<%--	</style>--%>
<%--	<!-- 任意自定义的 tab 元素 -->--%>
<%--	<div class="demo-tab-header layui-btn-container" id="tabHeader">--%>
<%--		<button class="layui-btn layui-btn-primary layui-this">必修</button>--%>
<%--		<button class="layui-btn layui-btn-primary">选修</button>--%>
<%--	</div>--%>
<%--	<div class="demo-tab-body" id="tabBody">--%>
<%--		<div class="layui-show">--%>
<%--			--%>
<%--		</div>--%>
<%--		<div>--%>
<%--			--%>
<%--		</div>--%>
<%--	</div>--%>
<%--	<script>--%>
<%--		layui.use(function(){--%>
<%--			var element = layui.element;--%>
<%--			// 绑定自定义的 tab 元素--%>
<%--			element.tab({--%>
<%--				headerElem: '#tabHeader>.layui-btn',--%>
<%--				bodyElem: '#tabBody>div'--%>
<%--			});--%>
<%--		});--%>
<%--	</script>--%>

<%--	<table border="2" cellpadding="0" cellspacing="0">--%>
<%--		<tr>--%>
<%--			<th>学年学期</th>--%>
<%--			<th>学号</th>--%>
<%--			<th>学生姓名</th>--%>
<%--			<th>课程编号</th>--%>
<%--			<th>课程名称</th>--%>
<%--			<th>成绩</th>--%>
<%--			<th>绩点</th>--%>
<%--			<th>学分</th>--%>
<%--			<th>课程大类</th>--%>
<%--			<th>修读方式</th>--%>
<%--			<th>考试性质</th>--%>
<%--			<th>成绩方式</th>--%>
<%--			<th>有效</th>--%>
<%--			<th>备注</th>--%>
<%--		</tr>--%>
<%--		<%--%>
<%--			List<StudentGrade> studentGrades = (List<StudentGrade>)session.getAttribute("studentGrades");--%>
<%--		%>--%>
<%--		<%--%>
<%--			for(StudentGrade student : studentGrades){--%>

<%--		%>--%>
<%--		<tr>--%>
<%--			<td><%= student.getYearTerm()%></td>--%>
<%--			<td><%= student.getStudentId()%></td>--%>
<%--			<td><%= student.getStudentName()%></td>--%>
<%--			<td><%= student.getCourseId()%></td>--%>
<%--			<td><%= student.getCourseName()%></td>--%>
<%--			<td><%= student.getScore() %></td>--%>
<%--			<td><%= student.getGradePoint() %></td>--%>
<%--			<td><%= student.getCredit() %></td>--%>
<%--			<td><%= student.getCourseClass() %></td>--%>
<%--			<td><%= student.getStudyWay() %></td>--%>
<%--			<td><%= student.getExamWay() %></td>--%>
<%--			<td><%= student.getGradeWay() %></td>--%>
<%--			<td><%= student.getEffectivity() %></td>--%>
<%--			<td><%= student.getRemarks() %></td>--%>
<%--		</tr>--%>
<%--		<%--%>
<%--			}--%>
<%--		%>--%>
<%--	</table>--%>

	<script src="layui-v2.8.4/layui/layui.js"></script>
	<link type="text/css" rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css"/>
</body>
</html>